import pytest,yamail
import os
if __name__ == '__main__':
    pytest.main(['A3mall.py','-s','--alluredir=./allurereport'])
    os.system('allure generate ./allure.results -o ./allure-html --clean')

    email = yamail.SMTP(user='3080172040@qq.com',password='ceswygiwtqzcdfhd',host='smtp.qq.com',port=465)
    email.send(to='3080172040@qq.com',subject='A3mall测试结果',contents=['执行了测试用例，通过','./A3mall.log','./A3mall.html'])
    email.close()